//
//  BGHeadView.m
//  bingke
//
//  Created by zhangkt zhangkt on 12-10-15.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "BGHeadView.h"
#import "BGQueryViewController.h"

@implementation BGHeadView
@synthesize searchBarText;
@synthesize delegate;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) 
    {
        
    }
    return self;
}

- (IBAction)backButton:(id)sender 
{
    BGAppDelegate *appDelegate = [UIApplication sharedApplication].delegate;
    [appDelegate.mainNavigationController popViewControllerAnimated:NO];
}

- (IBAction)buyGoods:(id)sender 
{
    NSLog(@"buyGoods");
}

- (IBAction)searchButton:(id)sender 
{
     NSLog(@"searchButton");
    BGQueryViewController *queryViewController = [[BGQueryViewController alloc] initWithNibName:@"BGQueryViewController" bundle:nil];
    BGAppDelegate *appDelegate = [UIApplication sharedApplication].delegate;
    [appDelegate.mainNavigationController pushViewController:queryViewController animated:NO];
    [queryViewController release];
}

- (IBAction)sharedButton:(id)sender 
{
    NSLog(@"sharedButton");
    [delegate sharedview];
}

- (void)dealloc 
{
    [searchBarText release];
    [super dealloc];
}

@end
